import { get, post, put, del } from '../utils/fetch';

const FormUrlencoded = {
    'Content-Type': 'application/x-www-form-urlencoded'
}
const FormDate = {
    'Content-Type': 'application/form-data'
}
// 通过projectId&collegeId获取公众号信息
export const querySourceInfo = (p) => get('/luffy/internal/api/v1/wx/source', p, { visitor: true })

// 通过x_field获取公众号信息
export const querySourceInfoByFlag = (p) => get('/luffy/internal/api/v1/wx/flag', p, { visitor: true })

// 通过shopid获取公众号信息
export const querySourceInfoByShopId = (p) => get('/luffy/internal/api/v1/wx/shop', p, { visitor: true })

// 获取国家区号
export const queryCountrycodeList = (p) => get("/notice/api/v1/countrycode", p, { visitor: true });

// 发送验证码
export const sendmessage = (p) => post('/sso/v1/member/sendmessage', p, { visitor: true, headers: FormUrlencoded })

// 检查是否为ocrm代理商账号
export const checkOcrmUserPhone = (p) => get("/nami/mobile/v1/agent/check/agent-or-ocrm-user", p, { visitor: true });

// 验证码登录
export const loginByCode = (p) => post('/api/v1/ucenter/loginsms', p, { visitor: true, headers: FormUrlencoded })

// 海外手机号验证码登录
export const LoginByOtherType = (p) => post('api/v1/type_login', p, { visitor: true, headers: FormDate })

